Telegram Group & Telegram Channel
Комплексные числа в Python

Кроме уже известных вам типов int, float и подобных, в Python существует еще один довольно интересный тип, а именно, complex.

В Python комплексные числа представлены в виде x + iy. Python преобразует реальные числа x и y в комплексное с помощью функции complex(x,y).

Это число можно превратить в строку с помощью str, посчитать его модуль с помощью abs, а также для доступа к его реальной или мнимой части можно воспользоваться функциями real() и imag().

Хотя данный тип и является встроенным, для полноценной работы с комплексными операциями понадобится модуль cmath.

Подписывайтесь на канал 👉@pythonofff



tg-me.com/pythonofff/2885
Create:
Last Update:

Комплексные числа в Python

Кроме уже известных вам типов int, float и подобных, в Python существует еще один довольно интересный тип, а именно, complex.

В Python комплексные числа представлены в виде x + iy. Python преобразует реальные числа x и y в комплексное с помощью функции complex(x,y).

Это число можно превратить в строку с помощью str, посчитать его модуль с помощью abs, а также для доступа к его реальной или мнимой части можно воспользоваться функциями real() и imag().

Хотя данный тип и является встроенным, для полноценной работы с комплексными операциями понадобится модуль cmath.

Подписывайтесь на канал 👉@pythonofff

BY Python академия




Share with your friend now:
tg-me.com/pythonofff/2885

View MORE
Open in Telegram


Python академия Telegram | DID YOU KNOW?

Date: |

What Is Bitcoin?

Bitcoin is a decentralized digital currency that you can buy, sell and exchange directly, without an intermediary like a bank. Bitcoin’s creator, Satoshi Nakamoto, originally described the need for “an electronic payment system based on cryptographic proof instead of trust.” Each and every Bitcoin transaction that’s ever been made exists on a public ledger accessible to everyone, making transactions hard to reverse and difficult to fake. That’s by design: Core to their decentralized nature, Bitcoins aren’t backed by the government or any issuing institution, and there’s nothing to guarantee their value besides the proof baked in the heart of the system. “The reason why it’s worth money is simply because we, as people, decided it has value—same as gold,” says Anton Mozgovoy, co-founder & CEO of digital financial service company Holyheld.

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.Python академия from sg


Telegram Python академия
FROM USA